.class public Lcom/waiqin365/lightapp/view/DatePickerDialog;
.super Lcom/waiqin365/lightapp/base/WqBaseActivity;


# instance fields
.field private a:Landroid/widget/DatePicker;


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Lcom/waiqin365/lightapp/base/WqBaseActivity;-><init>()V

    return-void
.end method

.method private a(Landroid/app/Activity;Landroid/view/MotionEvent;)Z
    .locals 5

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getX()F

    move-result v0

    float-to-int v0, v0

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getY()F

    move-result v1

    float-to-int v1, v1

    invoke-static {p1}, Landroid/view/ViewConfiguration;->get(Landroid/content/Context;)Landroid/view/ViewConfiguration;

    move-result-object v2

    invoke-virtual {v2}, Landroid/view/ViewConfiguration;->getScaledWindowTouchSlop()I

    move-result v2

    invoke-virtual {p1}, Landroid/app/Activity;->getWindow()Landroid/view/Window;

    move-result-object v3

    invoke-virtual {v3}, Landroid/view/Window;->getDecorView()Landroid/view/View;

    move-result-object v3

    neg-int v4, v2

    if-lt v0, v4, :cond_0

    neg-int v4, v2

    if-lt v1, v4, :cond_0

    invoke-virtual {v3}, Landroid/view/View;->getWidth()I

    move-result v4

    add-int/2addr v4, v2

    if-gt v0, v4, :cond_0

    invoke-virtual {v3}, Landroid/view/View;->getHeight()I

    move-result v0

    add-int/2addr v0, v2

    if-le v1, v0, :cond_1

    :cond_0
    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method


# virtual methods
.method public SelectTimeOnClick(Landroid/view/View;)V
    .locals 3

    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v1

    sparse-switch v1, :sswitch_data_0

    :goto_0
    return-void

    :sswitch_0
    const-string/jumbo v1, "year"

    iget-object v2, p0, Lcom/waiqin365/lightapp/view/DatePickerDialog;->a:Landroid/widget/DatePicker;

    invoke-virtual {v2}, Landroid/widget/DatePicker;->getYear()I

    move-result v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    const-string/jumbo v1, "month"

    iget-object v2, p0, Lcom/waiqin365/lightapp/view/DatePickerDialog;->a:Landroid/widget/DatePicker;

    invoke-virtual {v2}, Landroid/widget/DatePicker;->getMonth()I

    move-result v2

    add-int/lit8 v2, v2, 0x1

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    const-string/jumbo v1, "day"

    iget-object v2, p0, Lcom/waiqin365/lightapp/view/DatePickerDialog;->a:Landroid/widget/DatePicker;

    invoke-virtual {v2}, Landroid/widget/DatePicker;->getDayOfMonth()I

    move-result v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    const/4 v1, -0x1

    invoke-virtual {p0, v1, v0}, Lcom/waiqin365/lightapp/view/DatePickerDialog;->setResult(ILandroid/content/Intent;)V

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/view/DatePickerDialog;->finish()V

    goto :goto_0

    :sswitch_1
    invoke-virtual {p0}, Lcom/waiqin365/lightapp/view/DatePickerDialog;->finish()V

    goto :goto_0

    nop

    :sswitch_data_0
    .sparse-switch
        0x7f0c0054 -> :sswitch_0
        0x7f0c0350 -> :sswitch_1
    .end sparse-switch
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 5

    const/4 v4, -0x1

    invoke-super {p0, p1}, Lcom/waiqin365/lightapp/base/WqBaseActivity;->onCreate(Landroid/os/Bundle;)V

    const v0, 0x7f030114

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/view/DatePickerDialog;->setContentView(I)V

    const v0, 0x7f0c0667

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/view/DatePickerDialog;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/DatePicker;

    iput-object v0, p0, Lcom/waiqin365/lightapp/view/DatePickerDialog;->a:Landroid/widget/DatePicker;

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/view/DatePickerDialog;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string/jumbo v1, "year"

    invoke-virtual {v0, v1, v4}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v0

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/view/DatePickerDialog;->getIntent()Landroid/content/Intent;

    move-result-object v1

    const-string/jumbo v2, "month"

    invoke-virtual {v1, v2, v4}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v1

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/view/DatePickerDialog;->getIntent()Landroid/content/Intent;

    move-result-object v2

    const-string/jumbo v3, "day"

    invoke-virtual {v2, v3, v4}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v2

    if-eq v0, v4, :cond_0

    if-eq v1, v4, :cond_0

    if-eq v2, v4, :cond_0

    iget-object v3, p0, Lcom/waiqin365/lightapp/view/DatePickerDialog;->a:Landroid/widget/DatePicker;

    add-int/lit8 v1, v1, -0x1

    const/4 v4, 0x0

    invoke-virtual {v3, v0, v1, v2, v4}, Landroid/widget/DatePicker;->init(IIILandroid/widget/DatePicker$OnDateChangedListener;)V

    :cond_0
    return-void
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 1

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    if-nez v0, :cond_0

    invoke-direct {p0, p0, p1}, Lcom/waiqin365/lightapp/view/DatePickerDialog;->a(Landroid/app/Activity;Landroid/view/MotionEvent;)Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/view/DatePickerDialog;->finish()V

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    invoke-super {p0, p1}, Lcom/waiqin365/lightapp/base/WqBaseActivity;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v0

    goto :goto_0
.end method
